<?php
//Start session
if (!isset($_SESSION))
{
    session_start();
}
?>
<?php $titleloc = "Login";?>
<?php include("includes/header.php"); ?>
<h2>Login</h2>
<?php
if( isset($_SESSION['LOGIN_ERR']))
{
    $msg = $_SESSION['LOGIN_ERR'];
    echo '<span class="error">'. $msg .'</span><br /><br />';
    unset($_SESSION['LOGIN_ERR']);
}
?>
<form action="loginvalidate.php" method="post">
    <table>
        <tr>
            <td><span id="boldsmall">Username:</span></td>
            <td id="inputfield"><input class="post" name="username" id="username" size="25" value="" tabindex="1" type="text"></td>
        </tr>
        <tr>
            <td height="20" colspan="2">&nbsp;</td>
        </tr>
        <tr>
            <td><span id="boldsmall">Password:</span></td>
            <td id="inputfield"><input class="post" name="password" id="password" size="25" tabindex="2" type="password"></td>
        </tr>
        <tr>
            <td></td>
            <td id="inputfield"><input type="checkbox" name="autologin" tabindex="3" value="remember" />Remember me</td>
        </tr>
        <tr>
            <td height="20" colspan="2">&nbsp;</td>
        </tr>
        <tr>
            <td></td>
            <td id="inputfield"><input type="submit" class="btnmain" name="login" value="Login" /></td>
        </tr>
        <tr>
            <td height="20" colspan="2">&nbsp;</td>
        </tr>
        <tr>
            <td></td>
            <td id="inputfield"><a href="register.php">Register</a></td>
        </tr>
    </table>
</form>
<?php include("includes/footer.php"); ?>
